package distributed_mutex

import "time"

// WithExpiry can be used to set the expiry of a mutex to the given value.
func WithExpiry(expiry time.Duration) OptionFunc {
	return OptionFunc(func(m *DistributedMutex) {
		m.expiry = expiry
	})
}

// WithTries can be used to set the number of times lock acquire is attempted.
func WithTries(tries uint8) OptionFunc {
	return OptionFunc(func(m *DistributedMutex) {
		m.tries = tries
	})
}
